// components/Input/index.js
Component({
  properties: {
    label:String,
    value:String,
    placeholder:String,
    password:{
      type:Boolean,
      value:false,
    },
    name: String,
    disabled:{
      type:Boolean,
      value:false
    },
    rightImgPath:String,
    labelWidth:{
      type:Number,
      value:200
    },
    type:{
      type:String,
      value:"text"
    }
  },
  methods: {
    handleTap() {
      if (!this.data.disabled){
        return
      }
      this.triggerEvent('click')
    },
    ontap(e) {
      this.setData({
        value: e.detail.value
      })

      this.triggerEvent('change', e)
    }
  }
})
